package servlet.zj;

import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import dao.DAOFactory;
import dao.zj.AssessDao;
import dao.zj.OrderDao;
import dao.zj.ProductDao;

/**
 * Servlet implementation class BackStage
 */
@WebServlet("/BackStage")
public class BackStage extends HttpServlet {
	private static final long serialVersionUID = 1L;
	private ProductDao one=DAOFactory.createDAO();
	OrderDao two=new OrderDao();
	private AssessDao four=new AssessDao();
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		int productcount=one.count();
		request.setAttribute("product", productcount);
		int ordercount=two.countorder();
		request.setAttribute("order", ordercount);
		int assess=four.countassess();
		request.setAttribute("assess", assess);
		request.getRequestDispatcher("backstage.jsp").forward(request, response);		
	}
}
